SetMenuItemModifiers
NEW WITH THE APPEARANCE MANAGER
Sets the modifier key(s) that must be pressed with a character key to select a particular menu item.
pascal OSErr SetMenuItemModifiers ( MenuHandle inMenu, SInt16 inItem, SInt16 inModifiers);
inMenu
- The handle to the menu structure of the menu item for which you wish to set the modifier key(s).
inItem
- An integer representing the item number of the menu item for which you wish to set the modifier key(s).
inModifiers
- A value representing the modifier key(s) to be used in selecting the menu item; see "Modifier Key Mask Constants".
- function result
- A result code; see "Result Codes".
DISCUSSION
You can call theSetMenuItemModifiers
function to change the modifier key(s) you can include with a character key to create your keyboard equivalent. For example, you can change Command-x to Command-Option-Shift-x. By default, the Command key is always specified; however, you can remove the Command key by setting thekMenuNoCommand
flag in the modifier keys field of an extended menu item entry in the'xmnu'
resource; see "The Extended Menu Resource".SEE ALSO
"Appearance Manager Gestalt Selector Constants".